package com.licq.ldoc.parser.impl.annotation;

import java.lang.annotation.Annotation;

import net.sf.oval.constraint.Assert;

import com.licq.ldoc.domain.AbstractNode;
import com.licq.ldoc.parser.AnnotationParsee;
import com.licq.ldoc.parser.impl.TargetIgnorableAnnotationParsee;

public class AssertAnnotationParsee extends TargetIgnorableAnnotationParsee {
	
	public AssertAnnotationParsee(AnnotationParsee successor) {
		super(successor);
	}

	@Override
	protected void doParseTo(AbstractNode node, Annotation annotation) {
		Assert azzert = (Assert) annotation;
		node.appendComments(String.format(getText(), 
				azzert.lang(), azzert.expr()));
	}

}
